package com.demo.user.common;

/**
 * @author: xxh
 * @date: 2022/7/19
 **/
public class Constant {
    public static final int PAGE_DEFAULT_SIZE = 20;

    public static final String SUCCESS = "success";
    public static final String SUCCESS_RESULT_STRING = "验证成功";

    public static final String ERROR = "ERROR";
    public static final String URL_FORMAT_ERROR = "URL格式错误";
    public static final String FAILED = "failed";
    public static final String FAILED_RESULT_STRING = "验证失败";


    public static final String EXPIRE_TIME_FOREVER = "forever";
    public static final String EXPIRE_TIME_LIMIT = "limit";

    public static final String MOBILE_LENGTH_ERROR = "请输入11位手机号";
    public static final String ID_CARD_LENGTH_ERROR = "请输入18位身份证号";
    public static final String NAME_NULL_ERROR = "姓名不能为空";

    public static final String PATTERN_PASSWORD_REGEXP = "^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[_!@#,:?\\.\\$%\\^&\\*`~()\\-\\+=])[0-9a-zA-Z_!@#,:?\\.\\$%\\^&\\*`~()\\-\\+=]{8,20}$";
    public static final String PATTERN_PASSWORD_MESSAGE = "密码包含大小写字母、数字及特殊符号，且长度在8-20位之间";
    public static final String PATTERN_ID_CARD_REGEXP = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$";
    public static final String PATTERN_MOBILE_REGEXP = "^1\\d{10}$";

    public static final String SECURITY_VERIFY_CONTENT = "<p>尊敬的用户，您好：</p><p style=\"text-indent: 25px;\">您正在【沃土】进行账号操作，本次请求的邮件验证码是：{0}（为保障您账号的安全性，请您在10分钟内完成验证）.本验证码10分钟内有效，请及时输入。</p><p>为保障您的账号安全，请勿泄露此验证码。</p>";
    public static final String SECURITY_VERIFY_EMAIL_SUBJECT = "沃土验证码";

    public static final String CACHE_AUTH_TOKEN_PREFIX = "auth:token:";

    public static final String MESSAGE_ACQUIRE_LOCK_FAILED = "系统正在处理中，请勿重复尝试";

    public static final String EXCLUSIVE_LOCK_PREFIX = "__exclusive_lock_";

    public static final String AUTH_TYPE = "ADMIN";
    public static final String AUTH_TYPE_KEY = "type";




}
